#!/usr/bin/perl
#
# usage:
#   wget -q -O - http://localhost/cgi-bin/limura/Game/GameEnd.cgi

require 'config.ph';

@jobs = &GetJobNames();
@users = &GetUserNames();
foreach $user (@users){
	$url = &GetMasterURL($user);
	if($url ne ''){
		$result = join('', `$WGET -q -O - $url/clean.cgi'?'$user`);
		if($result !~ m/^success/){
			&PrintError($result);
			exit(0);
		}
	}
}
`rm -f $HOME_DIR/Game/jobs/*`;
#&ClearPoint();

if($result =~ m/^success/){
	&PrintResult("success");
}else{
	&PrintError($result);
}
exit(0);

